# coding=utf-8
"""
author: jamon
"""
from enum import unique, IntEnum

from obespoir.base.common_define import FRAME_SYNC, CLIENT_OFFLINE


@unique
class MsgID(IntEnum):
    """消息ID"""

    OFFLINE = CLIENT_OFFLINE   # 离线
    LOGOUT = 10001     # 注销

    LOGIN = 10010           # 登录
    CREATE_ROOM = 10020     # 创建房间
    DISMISS_ROOM = 10030    # 解散房间
    OTHER_LOGIN = 10040     # 其他玩家登录
    ENTER_ROOM = 10050      # 进入指定房间
    ENTER_MATCH_ROOM = 10055    # 进入匹配房间
    GAME_OPERATION = 10060  # 游戏操作
    GAME_OVER = 10070       # 游戏结束
    SET_READY = 10080       # 设置准备状态
    GAME_START = 10090      # 游戏开始

    HEARTBEAT = 10000  # 心跳包

    FRAME_BROADCAST = FRAME_SYNC    # 帧同步

    HOTFIX = 19999     # 热更


@unique
class ResponseStatus(IntEnum):
    """响应状态"""
    SUCCESS = 200
    FAILED = 500
